package com.chinairi.mall.dao;
import java.util.Collection;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinairi.mall.model.CancelOrder;import org.apache.ibatis.annotations.Param;import java.util.List;

public interface CancelOrderMapper extends BaseMapper<CancelOrder> {
    /**
     * 根据接收人id获得所有撤销的订单
     *
     * @param receiverId 接收人id
     * @return 接收到的所有撤销的订单
     */
    List<CancelOrder> getListByReceiverId(@Param("receiverId") String receiverId);

    /**
     * 根据创建人id获得所有撤销的订单
     *
     * @param createrId 创建人id
     * @return 创建的所有撤销的订单
     */
    List<CancelOrder> getListByCreatorId(@Param("createrId") String createrId);

    /**
     * 修改撤销订单状态
     *
     * @param ocId 撤销订单主键id
     * @return i
     */
    int updateByOcId(@Param("ocId") String ocId, @Param("state") String state);

    /**
     * 查询待确认的订单信息
     *
     * @param receiverId 接收人id
     * @return 待确认的订单信息列表
     */
    List<CancelOrder> getListPendingOrderByReceiverId(@Param("receiverId") String receiverId);

    /**
     * 新增拒绝订单信息
     *
     * @param cancelOrder cancelOrder
     * @return i
     */
    int add(CancelOrder cancelOrder);

    /**
     * 批量添加
     *
     * @param list list
     * @return i
     */
    int insertList(@Param("list") List<CancelOrder> list);

    /**
     * 根据rid获取所有提醒
     * @param receiverId 接收人id
     * @return 提醒列表
     */
    List<CancelOrder> getRemindListByReceiverId(@Param("receiverId")String receiverId);


}